<body>
<?php include 'header.phtml';?>

                   </div>
                        <div class="AppContent GridView">
                            <div id="ProductBreadCrumbView" class="BreadCrumbView">
                                <div class="breadcrumbs">
                                    <a href="<?php echo $this->basePath();?>/product">Products</a> &#47; 
                                    <span>Products</span>
                                </div>
                            </div>
                            <div id="ActionBarSearchAndListView" class="GridView">
                                <div id="SecuredActionBarForProductsSearchAndListView" class="SecuredActionBarForSearchAndListView ActionBarForSearchAndListView ActionBarConfigurableMetadataView ConfigurableMetadataView MetadataView">
                                    <div class="view-toolbar-container clearfix">
                                        <nav class="pillbox clearfix">
                                            <div class="active split-button" id="ProductsMenuActionElement--yt1">
                                                <a class="button-action" href="<?php echo $this->basePath();?>/product">
                                                    <i class="icon-products"></i>
                                                    <span class="button-label">Products</span>
                                                </a>
                                                <a class="button-trigger">
                                                    <i class="icon-trigger"></i>
                                                </a>
                                                <ul class="button-actions">
                                                    <li>
                                                        <a href="<?php echo $this->basePath();?>/product/add">Create Product</a>
                                                    </li>
                                                </ul>
                                            </div>
                                            <div id="ProductTemplatesMenuActionElement--yt2" class="split-button">
                                                <a class="button-action" href="<?php echo $this->basePath();?>/product/catalog">
                                                    <i class="icon-catalog-items"></i>
                                                    <span class="button-label">Catalog Items</span>
                                                </a><a class="button-trigger">
                                                    <i class="icon-trigger"></i>
                                                </a>
                                                <ul class="button-actions">
                                                    <li>
                                                        <a href="<?php echo $this->basePath();?>/product/catalog/add">Create Catalog Item</a>
                                                    </li>
                                                </ul>
                                            </div>
                                            <div id="ProductCategoriesMenuActionElement--yt3" class="split-button">
                                                <a class="button-action" href="<?php echo $this->basePath();?>/product/category">
                                                    <i class="icon-product-categories"></i>
                                                    <span class="button-label">Categories</span>
                                                </a>
                                                <a class="button-trigger">
                                                    <i class="icon-trigger"></i>
                                                </a>
                                                <ul class="button-actions">
                                                    <li>
                                                        <a href="<?php echo $this->basePath();?>/product/category/add">Create Category</a>
                                                    </li>
                                                </ul>
                                            </div>
                                            <div id="MassDeleteMenuActionElement--yt4" class="default-button">
                                                <a class="button-action-trigger">
                                                    <i class="icon-delete"></i>
                                                    <span class="button-label">Delete</span>
                                                    <i class="icon-trigger"></i>
                                                </a>
                                                <ul class="button-actions">
                                                    <li id="list-view-deleteMassActionSelected">
                                                        <a href="#">Selected</a>
                                                    </li>
                                                    <li id="list-view-deleteMassActionAll">
                                                        <a href="#">All Results</a>
                                                    </li>
                                                </ul>
                                            </div>
                                            <div id="ExportMenuActionElement--yt5" class="default-button">
                                                <a class="button-action-trigger">
                                                    <i class="icon-export"></i>
                                                    <span class="button-label">Export</span>
                                                    <i class="icon-trigger"></i>
                                                </a><ul class="button-actions">
                                                    <li id="list-view-exportActionSelected">
                                                        <a href="#">Selected</a>
                                                    </li>
                                                    <li id="list-view-exportActionAll">
                                                        <a href="#">All Results</a>
                                                    </li>
                                                </ul>
                                            </div>
                                        </nav>
                                        <nav class="pillbox clearfix">
                                            <div id="ProductIntroLinkActionElement--yt6" class="default-button">
                                                <a class="button-action-trigger">
                                                    <i class="icon-options"></i>
                                                    <span class="button-label"></span>
                                                    <i class="icon-trigger"></i>
                                                </a>
                                                <ul class="button-actions">
                                                    <li>
                                                        <div class="screen-options">
                                                            <h4>Screen Options</h4>
                                                            <label class="hasCheckBox">
                                                                <input id="ProductsIntroView-intro-content-checkbox-id" type="checkbox" value="1" name="ProductsIntroView-intro-content-checkbox-id" />
                                                            </label>
                                                            Show intro 
                                                        </div>
                                                    </li>
                                                </ul>
                                            </div>
                                        </nav>
                                    </div>
                                    <div id="ProductsIntroView" class="IntroView">
                                        <div id='ProductsIntroView-intro-content' class='module-intro-content' style=display:none;>
                                            <h1>How do Products work in Zurmo?</h1>
                                            <div id="products-intro-steps" class="module-intro-steps clearfix">
                                                <div class="third catalog-description">
                                                    <span class="icon"></span>
                                                    <p>
                                                        <strong>Catalog</strong>
                                                        A <em>Catalog</em>
                                                        is a collection of products and services your business offer.
                                                    </p>
                                                </div>
                                                <div class="third catalog-item-description">
                                                    <span class="icon"></span>
                                                    <p>
                                                        <strong>Catalog Item</strong>
                                                        Create a 
                                                        <em>Catalog Item</em>
                                                        that describes and categorizes your item and lists preset pricing information
                                                    </p>
                                                </div>
                                                <div class="third product-description">
                                                    <span class="icon"></span>
                                                    <p>
                                                        <strong>Product</strong>
                                                        A <em>Product</em> 
                                                        record is an actual customer order. Select an existing item from the catalog or create a free-standing product
                                                    </p>
                                                </div>
                                            </div>
                                            <div class="hide-module-intro">
                                                <a href="#" id="yt7">
                                                    <span></span>Dismiss
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="ProductsSearchView" class="SavedDynamicSearchView DynamicSearchView SearchView ModelView ConfigurableMetadataView MetadataView">
                                    <div class="wide form">
                                        <form id="search-form" action="/zurmo/app/index.php/zurmo/default/validateDynamicSearch?viewClassName=ProductsSearchView&amp;modelClassName=Product&amp;formModelClassName=ProductsSearchForm" method="post">
                                            <div style="display:none">
                                                <!--<input type="hidden" value="aeae080c2237fabea3f785dd445eca2d5fa56b6e" name="YII_CSRF_TOKEN" />-->
                                            </div>
                                            <div id="list-view-summary-clone" class="list-view-items-summary-clone">

                                            </div>
                                            <div class="search-view-0" >
                                                <table>
                                                    <tr>
                                                        <th></th>
                                                        <td colspan="3">
                                                            <select class="ignore-style ignore-clearform" id="ProductsSearchForm_anyMixedAttributesScope" multiple="multiple" style="display:none;" size="4" name="ProductsSearchForm[anyMixedAttributesScope][]">
                                                                <option value="All" selected="selected">All</option>
                                                                <option value="quantity">Quantity</option>
                                                                <option value="name">Name</option>
                                                            </select>
															<?php
															/*
																$form = $this->form;
																$form->setAttribute('action', $this->url('product', array('action' => 'add')));
																$form->prepare();
																echo $this->formInput($form->get('search'));
																echo $this->formSubmit($form->get('submit'));
															*/
															?>
                                                            <div class="errorMessage" id="ProductsSearchForm_anyMixedAttributes_em_" style="display:none"></div>
                                                        </td>
                                                    </tr>
                                                </table>

                                            </div>
                                            <div class="search-view-1" style='display:none;'>
                                                <div class="hasDropDown">
                                                    <span class="select-arrow"></span>
                                                    <select id="savedSearchId" name="savedSearchId">
                                                        <option value="">Load a saved search</option>
                                                    </select>
                                                </div>
                                                <div id="search-form_es_" class="errorSummary" style="display:none">
                                                    <p>Please fix the following input errors:</p>
                                                    <ul>
                                                        <li>dummy</li>
                                                    </ul>
                                                </div>
                                                <div style="display:none;">
                                                    <input id="ProductsSearchForm_dynamicClausesNotUsed" name="dynamicClausesValidationHelper" value="notUsed" type="hidden" />
                                                    <div id="ProductsSearchForm_dynamicClauses" class="errorMessage" style="display:none"></div>

                                                </div>
                                                <div class="add-fields-container">
                                                    <input id="rowCounter-search-form" type="hidden" value="0" name="rowCounter" />
                                                    <a id="addExtraAdvancedSearchRowButton-search-form" href="#">
                                                        <span class="z-spinner"></span>
                                                        <span class="z-icon"></span>
                                                        <span class="z-label">Add criteria</span>
                                                    </a>
                                                </div>
                                                <div class="search-save-container">
                                                    <strong class="mp-divider"> &middot; </strong>
                                                    <a id="save-as-advanced-search" href="#">Save search</a>
                                                </div>
                                                <div id="save-search-area" class="view-toolbar-container clearfix" style="display:none;">
                                                    <input name="ProductsSearchForm[savedSearchName]" id="ProductsSearchForm_savedSearchName" type="text" maxlength="64" />
                                                    <input name="ProductsSearchForm[savedSearchId]" id="ProductsSearchForm_savedSearchId" type="hidden" />
                                                    <input name="ProductsSearchForm[sortAttribute]" id="ProductsSearchForm_sortAttribute" type="hidden" />
                                                    <input name="ProductsSearchForm[sortDescending]" id="ProductsSearchForm_sortDescending" type="hidden" />
                                                    <a id="save-advanced-search" name="save" class="attachLoading z-button" value="saveSearch" onclick="js:$(this).addClass(&quot;attachLoadingTarget&quot;);jQuery.yii.submitForm(this, &#039;&#039;, {&#039;save&#039;:&#039;save&#039;}); return false;" href="#">
                                                        <span class="z-spinner"></span>
                                                        <span class="z-icon"></span>
                                                        <span class="z-label">Save</span>
                                                    </a>
                                                    <div class="errorMessage" id="ProductsSearchForm_savedSearchName_em_" style="display:none"></div>

                                                </div>
                                                <div id="show-dynamic-search-structure-wrapper-search-form" style="display:none;">
                                                    <a id="show-dynamic-search-structure-div-link-search-form" style="" href="#">Modify Structure</a>
                                                    <div id="show-dynamic-search-structure-div-search-form" class="has-lang-label" style="display:none;">
                                                        <input id="ProductsSearchForm_dynamicStructure" name="ProductsSearchForm[dynamicStructure]" class="dynamic-search-structure-input" type="text" />
                                                        <span>Search Operator</span>
                                                        <div class="errorMessage" id="ProductsSearchForm_dynamicStructure_em_" style="display:none"></div>

                                                    </div>

                                                </div>
                                                <div class="view-toolbar-container clearfix">
                                                    <div class="form-toolbar">
                                                        <a id="cancel-advanced-search" class="z-button" href="#">
                                                            <span class="z-label">Close</span>
                                                        </a>
                                                        <a id="search-advanced-search" name="save" class="attachLoading z-button" onclick="js:$(this).addClass(&quot;attachLoadingTarget&quot;);jQuery.yii.submitForm(this, &#039;&#039;, {&#039;save&#039;:&#039;save&#039;}); return false;" href="#">
                                                            <span class="z-spinner"></span>
                                                            <span class="z-icon"></span>
                                                            <span class="z-label">Search</span>
                                                        </a>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="select-list-attributes-view" style="display:none">
                                                <div class="attributesContainer">
                                                    <table>
                                                        <tbody>
                                                            <tr>
                                                                <td>
                                                                    <div class="multiselect-holder">
                                                                        <div class="multiselect-left">
                                                                            <label>Hidden Columns</label>
                                                                            <select size="10" multiple="multiple" class="ignore-style multiple" id="ProductsSearchForm_selectedListAttributes_hidden" name="ProductsSearchForm[selectedListAttributes]_hidden[]">

                                                                                <option value="account">Account</option>
                                                                                <option value="productTemplate">Catalog Item</option>
                                                                                <option value="contact">Contact</option>
                                                                                <option value="createdByUser">Created By User</option>
                                                                                <option value="createdDateTime">Created Date Time</option>
                                                                                <option value="description">Description</option>
                                                                                <option value="id">Id</option>
                                                                                <option value="modifiedByUser">Modified By User</option>
                                                                                <option value="modifiedDateTime">Modified Date Time</option>
                                                                                <option value="opportunity">Opportunity</option>
                                                                                <option value="priceFrequency">Price Frequency</option>
                                                                                <option value="sellPrice">Sell Price</option>
                                                                                <option value="stage">Stage</option>
                                                                                <option value="type">Type</option>
                                                                            </select>
                                                                        </div>
                                                                        <div class="multiselect-nav">
                                                                            <input id="yw2moveRight" class="icon-right-arrow" name="yt10" type="button" value="7" />
                                                                            <input id="yw2moveLeft" class="icon-left-arrow" name="yt11" type="button" value="8" />
                                                                        </div>
                                                                        <div class="multiselect-right">
                                                                            <label>Visible Columns</label>
                                                                            <select size="10" multiple="multiple" class="ignore-style multiple" id="ProductsSearchForm_selectedListAttributes" name="ProductsSearchForm[selectedListAttributes][]">
                                                                                <option value="name">Name</option>
                                                                                <option value="quantity">Quantity</option>
                                                                                <option value="owner">Owner</option>
                                                                            </select>
                                                                        </div>
                                                                        <div class="multiselect-nav multiselect-nav-updown">
                                                                            <input id="yw2moveUp" class="icon-up-arrow" name="yt12" type="button" value="5" />
                                                                            <input id="yw2moveDown" class="icon-down-arrow" name="yt13" type="button" value="6" />
                                                                        </div>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <div class="view-toolbar-container">
                                                    <div class="form-toolbar clearfix">
                                                        <a id="list-attributes-reset" name="save" class="default-btn z-button" onclick="js:$(this).addClass(&quot;attachLoadingTarget&quot;);jQuery.yii.submitForm(this, &#039;&#039;, {&#039;save&#039;:&#039;save&#039;}); return false;" href="#">
                                                            <span class="z-spinner"></span>
                                                            <span class="z-icon"></span>
                                                            <span class="z-label">Reset</span>
                                                        </a>
                                                        <a id="list-attributes-apply" name="save" class="attachLoading z-button" onclick="js:$(this).addClass(&quot;attachLoadingTarget&quot;);jQuery.yii.submitForm(this, &#039;&#039;, {&#039;save&#039;:&#039;save&#039;}); return false;" href="#">
                                                            <span class="z-spinner"></span>
                                                            <span class="z-icon"></span>
                                                            <span class="z-label">Apply</span>
                                                        </a>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="search-form-tools">
                                                <a id="more-search-link" href="#">Advanced</a>
                                                <a id="select-list-attributes-link" href="#">Columns</a>
                                                <a id="clear-search-link" style="display:none;" href="#">
                                                    <span class="clear-search-link-criteria-selected-count"></span>
                                                    Criteria Selected 
                                                    <span class="icon-clear">Z</span>
                                                </a>
                                                <input id="clearingSearch-search-form" type="hidden" name="clearingSearch" />
                                            </div>
                                        </form>
                                        <div id="modalContainer-search-form">
                                            
                                        </div>
                                        
                                    </div>
                                    
                                </div>
                                <div id="ProductsListView" class="SecuredListView ListView ModelView ConfigurableMetadataView MetadataView">
                                    <div class="cgrid-view type-products" id="list-view">
                                        <div class="summary">59 result(s)</div>
                                        <div class="items-wrapper">
                                        
                                            <table class="items">
                                                <thead>
                                                    <tr>
                                                        <th class="checkbox-column" id="list-view-rowSelector">
                                                            <label class="hasCheckBox">
                                                                <input type="checkbox" value="1" name="list-view-rowSelector_all" id="list-view-rowSelector_all" /></label></th><th id="list-view_c1"><a class="sort-link" href="/zurmo/app/index.php/products/default/index?Product_sort=name">Name</a></th><th id="list-view_c2"><a class="sort-link" href="/zurmo/app/index.php/products/default/index?Product_sort=quantity">Quantity</a></th><th id="list-view_c3"><a class="sort-link" href="/zurmo/app/index.php/products/default/index?Product_sort=owner">Owner</a></th><th class="button-column" id="list-view_c4">&#160;</th></tr>
                                                </thead>
                                                <tbody>
                                                
												<?php foreach ($products as $product) : ?>
												<tr>
													<td class='checkbox-column'><label class='hasCheckBox'><input value='3' id='list-view-rowSelector_0' type='checkbox' name='list-view-rowSelector[]' /></label></td>
													<td><a href="<?php echo $this->basePath();?>/product/detail/<?php echo $this->escapeHtml($product->id);?>"><?php echo $this->escapeHtml($product->name);?></a></td>
													<td><?php echo $this->escapeHtml($product->quantity);?></td>
													<td><?php echo $this->escapeHtml($product->firstname);?> <?php echo $this->escapeHtml($product->lastname);?></td>
													<td class="button-column"><a class="pencil" title="Update" href="<?php echo $this->basePath();?>/product/edit/<?php echo $this->escapeHtml($product->id);?>">!</a></td>
												</tr>
												<?php endforeach; ?>
												<?php
												/*
												$conn = mysql_connect('localhost','root','') or die ('Error connection to mySql');
												mysql_select_db('zurmo');
												$viewsql=mysql_query("select * from product");
												while($row=mysql_fetch_array($viewsql))
													{
														echo "<tr>";
														echo "<td class='checkbox-column'><label class='hasCheckBox'><input value='3' id='list-view-rowSelector_0' type='checkbox'' name='list-view-rowSelector[]' /></label></td>";
														echo "<td>".$row['name']."</td>";
														echo "<td>".$row['quantity']."</td>";
														echo "<td>".$row['contact_id']."</td>";
														echo "</tr>";
														
													}
												*/
												?>
												<!-- 
                                                    <tr class="odd">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="3" id="list-view-rowSelector_0" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=3&amp;stickyOffset=0">A Bend in the River November Issue</a></td><td>57</td><td>Katie Smith</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=3">!</a></td></tr>
                                                    <tr class="even">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="4" id="list-view-rowSelector_1" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=4&amp;stickyOffset=1">A Gift of Monotheists October Issue</a></td><td>21</td><td>Jason Blue</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=4">!</a></td></tr>
                                                    <tr class="odd">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="1" id="list-view-rowSelector_2" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=1&amp;stickyOffset=2">Amazing Kid Sample</a></td><td>11</td><td>Jill Smith</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=1">!</a></td></tr>
                                                    <tr class="even">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="41" id="list-view-rowSelector_3" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=41&amp;stickyOffset=3">Camera Inc 2 MegaPixel - Model 4Hpnt2-PBr</a></td><td>81</td><td>Katie Smith</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=41">!</a></td></tr>
                                                    <tr class="odd">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="40" id="list-view-rowSelector_4" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=40&amp;stickyOffset=4">Camera Inc 2 MegaPixel - Model 4Hpnt2-Pv7</a></td><td>38</td><td>Jason Blue</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=40">!</a></td></tr>
                                                    <tr class="even">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="25" id="list-view-rowSelector_5" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=25&amp;stickyOffset=5">Camera Inc 2 MegaPixel - Model COdnFv-P59</a></td><td>63</td><td>Jill Smith</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=25">!</a></td></tr>
                                                    <tr class="odd">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="24" id="list-view-rowSelector_6" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=24&amp;stickyOffset=6">Camera Inc 2 MegaPixel - Model COdnFv-Pup</a></td><td>28</td><td>John Smith</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=24">!</a></td></tr>
                                                    <tr class="even">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="35" id="list-view-rowSelector_7" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=35&amp;stickyOffset=7">Camera Inc 2 MegaPixel - Model fxcZC5-PaP</a></td><td>46</td><td>Jim Smith</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=35">!</a></td></tr>
                                                    <tr class="odd">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="34" id="list-view-rowSelector_8" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=34&amp;stickyOffset=8">Camera Inc 2 MegaPixel - Model fxcZC5-PKD</a></td><td>15</td><td>Jill Smith</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=34">!</a></td></tr>
                                                    <tr class="even">
                                                        <td class="checkbox-column"><label class="hasCheckBox"><input value="39" id="list-view-rowSelector_9" type="checkbox" name="list-view-rowSelector[]" /></label></td><td><a href="/zurmo/app/index.php/products/default/details?id=39&amp;stickyOffset=9">Camera Inc 2 MegaPixel - Model gV2SFw-Pke</a></td><td>53</td><td>Jason Blue</td><td class="button-column"><a class="pencil" title="Update" href="/zurmo/app/index.php/products/default/edit?id=39">!</a></td></tr>
                                                         -->
                                                </tbody>
                                            </table></div><div class="pager vertical"><ul id="yw3" class="endless-list-pager"><li class="next"><a id="list-view-endless-page" class="vertical-forward-pager" href="#"><span>next</span></a></li></ul></div><div class="list-preloader"><span class="z-spinner"></span></div><div class="keys" style="display:none" title="/zurmo/app/index.php/products/default"><span>3</span><span>4</span><span>1</span><span>41</span><span>40</span><span>25</span><span>24</span><span>35</span><span>34</span><span>39</span></div>
                                    </div>
                                    <input type="hidden" value="" name="list-view-selectedIds" id="list-view-selectedIds" />
                                </div></div></div><div id="FlashMessageView"><div id = "FlashMessageBar"></div></div></div><div id="ModalContainerView"><div id="modalContainer"></div></div><div id="ModalGameNotificationContainerView"></div><div id="GameCoinContainerView"></div><div id="FooterView"><a href="http://www.zurmo.com" id="credit-link" class="clearfix"><span>Copyright &#169; Zurmo Inc., 2013. All rights reserved.</span></a><div class="ui-chooser"><a class="icon-mobile" href="/zurmo/app/index.php/zurmo/default/userInterface?userInterface=Mobile"><span>Show Mobile</span></a><a class="icon-desktop active" href="/zurmo/app/index.php/zurmo/default/userInterface?userInterface=Desktop"><span>Show Full</span></a></div></div></div></div></div><script type="text/javascript">
                                    /*<![CDATA[*/
                                    function closeGamificationDashboard(){
                                        $('#UserGameDashboardView').remove();
                                        $('body').removeClass('gd-dashboard-active');
                                        $('#header-game-dashboard-link').html('?').toggleClass('highlighted');
                                    }

                                    function deleteSavedSearchAndRemoveFromView(modelId)
                                    {
                                        $.ajax({
                                            url : '/zurmo/app/index.php/zurmo/default/deleteSavedSearch?id=' + modelId,
                                            type : 'GET',
                                            dataType : 'json',
                                            success : function(data)
                                            {
                                                var inputId = 'savedSearchId';
                                                $('#' + inputId + ' > option').each(function(){
                                                    if (this.value == modelId)
                                                    {
                                                        $('#' + inputId + ' option[value=\'' + this.value + '\']').remove();
                                                    }
                                                });
                                                $('#removeSavedSearch').remove();
                                                $('#ProductsSearchForm_savedSearchId').val('');
                                            },
                                            error : function()
                                            {
                                                //todo: error call
                                            }
                                        });
                                    }
            
                                    jQuery(function($) {

                                        jQuery("body").ajaxComplete(
                                        function(event, request, options)
                                        {
                                            if (request.responseText == "sessionTimeout")
                                            {
                                                $.cookie("sessionTimeoutCookie", 1,
                                                {
                                                    expires : 1,
                                                    path:  "/"
                                                });
                                                window.location.reload(true);
                                            }
                                        }
                                    );
                
                                        $('#go-to-dashboard-link, #close-game-notification-link').click(function(event){
                                            event.preventDefault();
                                            $('#game-notification').fadeOut(300, function(){
                                                $('#game-notification').remove();
                                            });
                                        });
                                        $('.gd-dashboard-active').on('click', function(){
                                            if($('#UserGameDashboardView').length){
                                                closeGamificationDashboard();
                                            }
                                            return false;
                                        });
                                        $('body').on('click', '#header-game-dashboard-link', function(){jQuery.ajax({'beforeSend':function(){
                                                    if($("#UserGameDashboardView").length){
                                                        closeGamificationDashboard();
                                                        return false;
                                                    }
                                                    $("body").addClass("gd-dashboard-active");
                                                    $("#header-game-dashboard-link").html("�").toggleClass("highlighted");
                                                },'success':function(data){$("#FooterView").after(data);},'url':'/zurmo/app/index.php/users/default/gameDashboard?id=1','cache':false});return false;});
                                        $(".nav li").hover(
                                        function () {
                                            if ($(this).hasClass("parent")) {
                                                $(this).addClass("over");
                                            }
                                        },
                                        function () {
                                            $(this).removeClass("over");
                                        }
                                    );

                                        $("#globalSearchScope").bind("multiselectclick", function(event, ui){
                                            if ($("#globalSearchScope").multiselect("widget").find(":checkbox:checked").length == 0)
                                            {
                                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                                    if (this.value == "All" && !this.checked)
                                                    {
                                                        this.click();
                                                    }
                                                });
                                            }
                                            if (ui.value == "All" && ui.checked)
                                            {
                                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                                    if (this.value != "All" && this.checked)
                                                    {
                                                        this.click();
                                                    }
                                                });
                                            }
                                            else if (ui.value != "All" && ui.checked)
                                            {
                                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                                    if (this.value == "All" && this.checked)
                                                    {
                                                        this.click();
                                                    }
                                                });
                                            }
                                        });
                       
                                        $('#globalSearchScope').multiselect({'selectedText':'','noneSelectedText':'','header':false,'position':{'my':'right top','at':'right bottom'}}); $(this).setupCheckboxStyling($('#globalSearchScope').parent())
                                        $("#globalSearchInput").bind("focus", function(event, ui){
                                            $("#globalSearchInput").autocomplete("option", "source", "/zurmo/app/index.php/zurmo/default/globalSearchAutoComplete?" + $.param($("#globalSearchScope").serializeArray()));
                                        });
                       
                                        jQuery('#globalSearchInput').autocomplete({'select': function(event, ui) {if (ui.item.href.length > 0){window.location = ui.item.href;} return false;},'search': function(event, ui) { $(this).makeOrRemoveTogglableSpinner(true, "#app-search") },'open': function(event, ui) { $(this).makeOrRemoveTogglableSpinner(false, "#app-search") },'position':{'my':'right top','at':'right bottom'},'source':'/zurmo/app/index.php/zurmo/default/globalSearchAutoComplete'});
                                        $("#globalSearchInput").data( "autocomplete" )._renderItem = function( ul, item ) {
                                            return $( "<li></li>" ).data( "item.autocomplete", item )
                                            .append( "<a><span class=" + item.iconClass + "></span><span>" + item.label + "</span></a>" )
                                            .appendTo( ul );
                                        };
                                        $('body').on('click', '#yt0', function(){jQuery.ajax({'beforeSend':function(){
                                                    jQuery('#modalContainer').html('');
                                                    $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                                                    window.scrollTo(0, 0);
                                                    jQuery('#modalContainer').dialog({
                                                        'title' : 'Create Task',
                                                        'autoOpen' : true,
                                                        'modal' : true,
                                                        'position' : 'center top+25',
                                                        'dialogClass' : 'task-dialog',
                                                        'height' : 'auto',
                                                        'open': function( event, ui )  { jQuery('#modalContainer').parent().addClass('openingModal'); },
                                                        'close': function( event, ui ) { jQuery('#modalContainer').parent().removeClass('openingModal');
                                                            $('#modalContainer').dialog('destroy');
                                                     
                                                        }
                                                    });
                                                    return true;
                                                },'url':'/zurmo/app/index.php/tasks/default/modalCreate?modalId=modalContainer','cache':false,'success':function(html){jQuery("#modalContainer").html(html)}});return false;});

                                        function massActionMenuActionElementEventHandler(elementType, gridId, baseUrl, actionId, pageVarName)
                                        {
                                            selectAll = '';
                                            if (elementType == 1)
                                            {
                                                if ($('#' + gridId + '-selectedIds').val() == '')
                                                {
                                                    alert('You must select at least one record');
                                                    $(this).val('');
                                                    return false;
                                                }
                                            }
                                            else
                                            {
                                                selectAll = 1;
                                            }
                                            var options =
                                                {
                                                url     : $.fn.yiiGridView.getUrl(gridId),
                                                baseUrl : baseUrl
                                            }
                                            if (options.url.split( '?' ).length == 2)
                                            {
                                                options.url = options.baseUrl + '/' + actionId + '?' + options.url.split( '?' )[1];
                                            }
                                            else
                                            {
                                                options.url = options.baseUrl + '/' + actionId;
                                            }
                                            if (elementType == 1)
                                            {
                                                addListViewSelectedIdsToUrl(gridId, options);
                                            }
                                            var data = '' + actionId + '=' + '&selectAll=' + selectAll + '&ajax=&' + pageVarName + '=1';
                                            url = $.param.querystring(options.url, data);
                                            url += '';
                                            window.location.href = url;
                                            return false;
                                        }
                
                                        $('#list-view-deleteMassActionAll').unbind('click.action').bind('click.action', function()
                                        {
                                            massActionMenuActionElementEventHandler(0, 'list-view', '/zurmo/app/index.php/products/default', 'massDelete', 'Product_page')
                                        }
                                    );
                                        $('#list-view-deleteMassActionSelected').unbind('click.action').bind('click.action', function()
                                        {
                                            massActionMenuActionElementEventHandler(1, 'list-view', '/zurmo/app/index.php/products/default', 'massDelete', 'Product_page')
                                        }
                                    );
                                        $('#list-view-exportActionAll').unbind('click.action').bind('click.action', function()
                                        {
                                            massActionMenuActionElementEventHandler(0, 'list-view', '/zurmo/app/index.php/products/default', 'export', 'Product_page')
                                        }
                                    );
                                        $('#list-view-exportActionSelected').unbind('click.action').bind('click.action', function()
                                        {
                                            massActionMenuActionElementEventHandler(1, 'list-view', '/zurmo/app/index.php/products/default', 'export', 'Product_page')
                                        }
                                    );
                                        $('body').on('click', '#ProductsIntroView-intro-content-checkbox-id', function(){jQuery.ajax({'type':'GET','url':'/zurmo/app/index.php/zurmo/default/toggleDismissIntroView?moduleName=ProductsModule&panelId=ProductsIntroView-intro-content','success':function()
                                                {
                                                    var checked = $('#ProductsIntroView-intro-content-checkbox-id').attr('checked');
                                                    $('#ProductsIntroView-intro-content').slideToggle();
                                                    $('#ProductsIntroView-intro-content-checkbox-id').attr('checked', !checked);
                                                    if (checked)
                                                    {
                                                        $('#ProductsIntroView-intro-content-checkbox-id').parent().removeClass('c_on');
                                                    }
                                                    else
                                                    {
                                                        $('#ProductsIntroView-intro-content-checkbox-id').parent().addClass('c_on');
                                                    }
                                                }
                                                ,'cache':false,'data':jQuery(this).parents("form").serialize()});return false;});
                                        $(this).resolveHighestAndEqualize($('.module-intro-steps'));$(window).resize(function()
                                        {
                                            $(this).resolveHighestAndEqualize($('.module-intro-steps'));
                                        });
                                        $('body').on('click', '#yt7', function(){jQuery.ajax({'type':'GET','success':function()
                                                {
                                                    $('#ProductsIntroView-intro-content-checkbox-id').attr('checked', false).parent().removeClass('c_on');
                                                    $('#ProductsIntroView-intro-content').slideToggle();
                                                }
                                                ,'url':'/zurmo/app/index.php/zurmo/default/toggleDismissIntroView?moduleName=ProductsModule&panelId=ProductsIntroView-intro-content','cache':false,'data':jQuery(this).parents("form").serialize()});return false;});
                                        $("#ProductsSearchForm_anyMixedAttributesScope").bind("multiselectclick", function(event, ui){
                                            if ($("#ProductsSearchForm_anyMixedAttributesScope").multiselect("widget").find(":checkbox:checked").length == 0)
                                            {
                                                $("#ProductsSearchForm_anyMixedAttributesScope").multiselect("widget").find(":checkbox").each(function(){
                                                    if (this.value == "All" && !this.checked)
                                                    {
                                                        this.click();
                                                    }
                                                });
                                            }
                                            if (ui.value == "All" && ui.checked)
                                            {
                                                $("#ProductsSearchForm_anyMixedAttributesScope").multiselect("widget").find(":checkbox").each(function(){
                                                    if (this.value != "All" && this.checked)
                                                    {
                                                        this.click();
                                                    }
                                                });
                                            }
                                            else if (ui.value != "All" && ui.checked)
                                            {
                                                $("#ProductsSearchForm_anyMixedAttributesScope").multiselect("widget").find(":checkbox").each(function(){
                                                    if (this.value == "All" && this.checked)
                                                    {
                                                        this.click();
                                                    }
                                                });
                                            }
                                        });
                       
                                        $('#ProductsSearchForm_anyMixedAttributesScope').multiselect({'selectedText':'','noneSelectedText':'','header':false}); $(this).setupCheckboxStyling($('#ProductsSearchForm_anyMixedAttributesScope').parent())
                                        basicSearchQueued = 0; basicSearchOldValue = '';   var basicSearchHandler = function(event)
                                        {
                                            if (basicSearchOldValue != $(this).val())
                                            {
                                                basicSearchOldValue = $(this).val();
                                                basicSearchQueued = basicSearchQueued  + 1;
                                                setTimeout('basicSearchQueued = basicSearchQueued - 1', 900);
                                                setTimeout('$(this).searchByQueuedSearch("ProductsSearchForm_anyMixedAttributes")', 1000);
                                            }
                                        };   $('#ProductsSearchForm_anyMixedAttributes').unbind('input.ajax propertychange.ajax keyup.ajax');
                                        $('#ProductsSearchForm_anyMixedAttributes').bind('input.ajax propertychange.ajax keyup.ajax', basicSearchHandler);
                            

                                        $('#savedSearchId').unbind('change'); $('#savedSearchId').bind('change', function()
                                        {
                                            if ($(this).val() != '')
                                            {
                                                savedSearchId = $(this).val();
                                                $.ajax(
                                                {
                                                    url: '/zurmo/app/index.php/zurmo/default/clearStickySearch?key=ProductsSearchView',
                                                    complete: function(data)
                                                    {
                                                        window.location = '<?php echo $this->basePath();?>/product?savedSearchId=' + savedSearchId;
                                                    }
                                                });
                                            }
                                        });
                                        $('body').off('click.add', '#addExtraAdvancedSearchRowButton-search-form'); $('body').on('click.add', '#addExtraAdvancedSearchRowButton-search-form', function(){jQuery.ajax({'type':'GET','data':'rowNumber=' + $('#rowCounter-search-form').val(),'beforeSend':function(){
                                                    $(this).makeOrRemoveLoadingSpinner(true, "#search-form", "dark");
                                                },'success':function(data){
                                                    $('#rowCounter-search-form').val(parseInt($('#rowCounter-search-form').val()) + 1)
                                                    $('#addExtraAdvancedSearchRowButton-search-form').parent().before(data);
                                                    rebuildDynamicSearchRowNumbersAndStructureInput("search-form");
                                                    resolveClearLinkPrefixLabelAndVisibility("search-form");
                                                    $(this).makeOrRemoveLoadingSpinner(false, "#search-form");
                                                },'url':'/zurmo/app/index.php/zurmo/default/dynamicSearchAddExtraRow?viewClassName=ProductsSearchView&modelClassName=Product&formModelClassName=ProductsSearchForm&suffix=search-form','cache':false});return false;});

                                        $('#select-list-attributes-link').unbind('click.more');
                                        $('#select-list-attributes-link').bind('click.more',  function(event)
                                        {
                                            $(this).closest('form').find('.search-view-1').hide();
                                            $(this).closest('form').find('.kanban-board-options-view').hide();
                                            $('.select-list-attributes-view').toggle();
                                            return false;
                                        }
                                    );
                                        $('#list-attributes-reset').unbind('click.close');
                                        $('#list-attributes-reset').bind('click.close', function()
                                        {
                                            $('.select-list-attributes-view').hide();
                                        }
                                    );
                                        $('#list-attributes-apply').unbind('click.close');
                                        $('#list-attributes-apply').bind('click.close', function()
                                        {
                                            $('.select-list-attributes-view').hide();
                                        }
                                    );
                
                                        $('#yw2moveRight').click(function()
                                        {
                                            return !$('#ProductsSearchForm_selectedListAttributes_hidden option:selected')
                                            .remove().appendTo('#ProductsSearchForm_selectedListAttributes');
                                        });
                                        $('#yw2moveLeft').click(function()
                                        {
                                            return !$('#ProductsSearchForm_selectedListAttributes option:selected')
                                            .remove().appendTo('#ProductsSearchForm_selectedListAttributes_hidden');
                                        });$('#search-form').submit(function()
                                        {
                                            $('#ProductsSearchForm_selectedListAttributes_hidden option').each(function(i)
                                            {
                                                $(this).attr('selected', 'selected');
                                            });
                                        });$('#search-form').submit(function()
                                        {
                                            $('#ProductsSearchForm_selectedListAttributes option').each(function(i)
                                            {
                                                $(this).attr('selected', 'selected');
                                            });
                                        });$('#yw2moveUp').click(function()
                                        {
                                            if ($('#ProductsSearchForm_selectedListAttributes option:selected').first().index() > 0)
                                            {
                                                $('#ProductsSearchForm_selectedListAttributes option:selected').each(function()
                                                {
                                                    $(this).insertBefore($(this).prev());
                                                });
                                            }
                                        });
                                        $('#yw2moveDown').click(function()
                                        {
                                            if ($('#ProductsSearchForm_selectedListAttributes option:selected').last().index() < ($('#ProductsSearchForm_selectedListAttributes option').length - 1))
                                            {
                                                $($('#ProductsSearchForm_selectedListAttributes option:selected').get().reverse()).each(function(i, selected)
                                                {
                                                    if (!$(this).next().length) return false;
                                                    $(this).insertAfter($(this).next());
                                                });
                                            }
                                        });

                                        $('#list-attributes-reset').unbind('click.reset');
                                        $('#list-attributes-reset').bind('click.reset', function()
                                        {
                                            $('.select-list-attributes-view').hide();
                                            resetSelectedListAttributes('ProductsSearchForm_selectedListAttributes', 'ProductsSearchForm_selectedListAttributes_hidden', ["name","quantity","owner"]);
                                        }
                                    );

                                        $('#clear-search-link').removeAttr('clearForm');
                                        $('#clear-search-link').clearform({
                                            form: '#search-form'
                                        }
                                    );
                                        $('#clear-search-link').unbind('click.clear');
                                        $('#clear-search-link').bind('click.clear', function(){
                                            $('#clearingSearch-search-form').val('1');
                                            $('#clear-search-link').hide();
                                            $(this).closest('form').find('.search-view-1').find('.dynamic-search-row').each(function()
                                            {
                                                $(this).remove();
                                            });
                                            $('#rowCounter-search-form').val(0);
                                            $('#ProductsSearchForm_dynamicStructure').val('');
                                            $(this).closest('form').find('.search-view-1').hide();
                                            $('.select-list-attributes-view').hide();
                                            resolveClearLinkPrefixLabelAndVisibility('search-form');
                                            rebuildDynamicSearchRowNumbersAndStructureInput('search-form');
                                            $('#savedSearchId').val();
                                            $('#ProductsSearchForm_savedSearchId').val('');
                                            $('#save-search-area').hide();
                                            jQuery.yii.submitForm(this, '', {}); return false;
            
                                            $(this).closest('form').submit();
                                            $('#clearingSearch-search-form').val('');
                                            return false;
                                        }
                                    );
                                        $('#more-search-link').unbind('click.more');
                                        $('#more-search-link').bind('click.more',  function(event){
                                            $('.select-list-attributes-view').hide();
                                            $('.kanban-board-options-view').hide();
                                            $(this).closest('form').find('.search-view-1').toggle();
                                            return false;
                                        }
                                    );
                                        $('#cancel-advanced-search').unbind('click');
                                        $('#cancel-advanced-search').live('click', function(event){
                                            $(this).closest('form').find('.search-view-1').hide();
                                        });
            
                                        $('#search-form').find('.anyMixedAttributes-input').unbind('input.clear propertychange.clear keyup.clear');
                                        $('#search-form').find('.anyMixedAttributes-input').bind('input.clear propertychange.clear keyup.clear', function(event)
                                        {
                                            $('#clear-search-link').show();
                                        });
                                        $('#search-form').find('.anyMixedAttributes-input').unbind('input.clear propertychange.clear keyup.clear');
                                        $('#search-form').find('.anyMixedAttributes-input').bind('input.clear propertychange.clear keyup.clear', function(event)
                                        {
                                            resolveClearLinkPrefixLabelAndVisibility('search-form');
                                        });$('#save-as-advanced-search').click( function()
                                        {
                                            $('#save-search-area').show();
                                            return false;
                                        }
                                    );

                                        $('#show-dynamic-search-structure-div-link-search-form').click( function()
                                        {
                                            $('#show-dynamic-search-structure-div-search-form').show();
                                            $('#show-dynamic-search-structure-div-link-search-form').hide();
                                            return false;
                                        }
                                    );
                                        $('#search-form').yiiactiveform({'validateOnSubmit':true,'validateOnChange':false,'beforeValidate':$(this).beforeValidateAction,'afterValidate':afterDynamicSearchValidateAjaxAction,'afterValidateAjax':'var inputId = \'savedSearchId\';\n                        if (data.id != undefined)\n                        {\n                            var existingSearchFound = false;\n                            $(\'#\' + inputId + \' > option\').each(function()\n                            {\n                               if (this.value == data.id)\n                               {\n                                   $(\'#\' + inputId + \' option[value=\\\'\' + this.value + \'\\\']\').text(data.name);\n                                   existingSearchFound = true;\n                               }\n                            });\n                            if (!existingSearchFound)\n                            {\n                                $(\'#\' + inputId).removeClass(\'ignore-style\');\n                                $(\'#\' + inputId)\n                                    .append($(\'<option><\/option>\')\n                                    .attr(\'value\', data.id)\n                                    .text(data.name))\n                                //$(\'#\' + inputId).val(data.id); Do not select new saved search since it is not sticky at this point.\n                                $(\'#ProductsSearchForm_savedSearchId\').val(data.id);\n                            }\n                        }\n                        $(\'#search-form\').find(\'.attachLoadingTarget\').removeClass(\'loading\');\n                        $(\'#search-form\').find(\'.attachLoadingTarget\').removeClass(\'loading-ajax-submit\');\n                        $(\'#search-form\').find(\'.attachLoadingTarget\').removeClass(\'attachLoadingTarget\');$(this).closest(\'form\').find(\'.search-view-1\').hide();\n                        $(\'.select-list-attributes-view\').hide();\n                        $(\'#search-form\').find(\'.attachLoading:first\').removeClass(\'loading\');\n                        $(\'#search-form\').find(\'.attachLoading:first\').removeClass(\'loading-ajax-submit\');\n                        $(\'#list-view-selectedIds\').val(null);\n                        $.fn.yiiGridView.update(\'list-view\',\n                        {\n                            data: $(\'#search-form\').serialize() + \'&Product_page=&Product_sort=\' // Not Coding Standard\n                         }\n                        );\n                        $(\'#clearingSearch-search-form\').val(\'\');\n                        ','attributes':[{'id':'ProductsSearchForm_anyMixedAttributes','inputID':'ProductsSearchForm_anyMixedAttributes','errorID':'ProductsSearchForm_anyMixedAttributes_em_','model':'ProductsSearchForm','name':'anyMixedAttributes','enableAjaxValidation':true},{'id':'ProductsSearchForm_dynamicClauses','inputID':'ProductsSearchForm_dynamicClauses','errorID':'ProductsSearchForm_dynamicClauses','model':'ProductsSearchForm','name':'dynamicClauses','enableAjaxValidation':true},{'id':'ProductsSearchForm_savedSearchName','inputID':'ProductsSearchForm_savedSearchName','errorID':'ProductsSearchForm_savedSearchName_em_','model':'ProductsSearchForm','name':'savedSearchName','enableAjaxValidation':true},{'id':'ProductsSearchForm_dynamicStructure','inputID':'ProductsSearchForm_dynamicStructure','errorID':'ProductsSearchForm_dynamicStructure_em_','model':'ProductsSearchForm','name':'dynamicStructure','enableAjaxValidation':true},{'id':'ProductsSearchForm','inputID':'ProductsSearchForm_','errorID':'ProductsSearchForm__em_','model':'ProductsSearchForm','name':null,'enableAjaxValidation':true}],'summaryID':'search-form_es_'});
                                        jQuery('#list-view-rowSelector_all').live('click', function()
                                        {
                                            var checked = this.checked;

                                            //custom checkbox style
                                            if (this.checked){
                                                jQuery(this).parent().addClass('c_on');
                                            }
                                            else
                                            {
                                                jQuery(this).parent().removeClass('c_on');
                                            }

                                            jQuery("input[name='list-view-rowSelector\[\]']").each(function()
                                            {
                                                this.checked = checked;
                                                updateListViewSelectedIds('list-view', $(this).val(), checked);

                                                //custom checkbox style
                                                if (this.checked){
                                                    jQuery(this).parent().addClass('c_on');
                                                }
                                                else
                                                {
                                                    jQuery(this).parent().removeClass('c_on');
                                                }
                                            });
                                        });
                                        jQuery("input[name='list-view-rowSelector\[\]']").live('click', function()
                                        {
                                            jQuery('#list-view-rowSelector_all').attr( 'checked', jQuery("input[name='list-view-rowSelector\[\]']").length == jQuery("input[name='list-view-rowSelector\[\]']:checked").length);
                                            updateListViewSelectedIds('list-view', $(this).val(), $(this).attr('checked'));

                                            //custom checkbox style
                                            if ( jQuery('#list-view-rowSelector_all').attr( 'checked') === 'checked' ){
                                                jQuery('#list-view-rowSelector_all').parent().addClass('c_on');
                                            }
                                            else
                                            {
                                                jQuery('#list-view-rowSelector_all').parent().removeClass('c_on');
                                            }
                                            if ( this.checked )
                                            {
                                                jQuery(this).parent().addClass('c_on');
                                            }
                                            else
                                            {
                                                jQuery(this).parent().removeClass('c_on');
                                            }
                                        });
                                        jQuery('#list-view').yiiGridView({'ajaxUpdate':['list-view'],'ajaxVar':'ajax','pagerClass':'pager vertical','loadingClass':'loading','filterClass':'filters','tableClass':'items','selectableRows':2,'enableHistory':false,'updateSelector':'{page}, {sort}','filterSelector':'{filter}','pageVar':'Product_page','beforeAjaxUpdate':function(id, options) { $(this).makeSmallLoadingSpinner(true, "#" + id); addListViewSelectedIdsToUrl(id, options); },'afterAjaxUpdate':function(id, data) {
                                                processAjaxSuccessError(id, data);
                                                var $data = $(data);
                                                jQuery.globalEval($data.filter("script").last().text());
                                            }});

                                        processListViewSummaryClone("list-view", "summary", "list-view-summary-clone");
            

                                        $('#list-view-endless-page').unbind('click');
                                        $('#list-view-endless-page').bind('click', function(event)
                                        {
                                            $.fn.yiiGridView.update('list-view',
                                            {
                                                url: '<?php echo $this->basePath();?>/product?Product_page=2',
                                                type: 'GET',
                                                success: function(data,status) {
                                                    var id = 'list-view';
                                                    var settings = $.fn.yiiGridView.settings[id];
                                                    $.each(settings.ajaxUpdate, function(i,v) {
                                                        var id='#'+v;
                                                        $(id).find('tbody:first').append($(id, data).find('tbody:first').html());
                                                        $(id).find('.endless-list-pager').replaceWith($(id, data).find('.endless-list-pager'));
                                                    });
                                                    var $data = $(data);
                                                    jQuery.globalEval($data.filter('script').last().text());
                                                    if (settings.afterAjaxUpdate !== undefined)
                                                        settings.afterAjaxUpdate(id, data);
                                                    $('#'+id).removeClass(settings.loadingClass);
                                                    //$.fn.yiiGridView.selectCheckedRows(id);
                                                },
                                            });
                                            return false;
                                        }
                                    );
                                    });
                                    /*]]>*/
        </script>
<!-- 

<div id="ProductsListView" class="SecuredListView ListView ModelView ConfigurableMetadataView MetadataView">
	<div class="cgrid-view type-products" id="list-view">
		<div class="items-wrapper"><table class="items">
  <th id="list-view">
    <td>Nama</td>
    <td>Quantity</td>
    <td>Contact</td>
  </th>
  <?php/*
$conn = mysql_connect('localhost','root','') or die ('Error connection to mySql');
mysql_select_db('zurmo');
$viewsql=mysql_query("select * from product");
while($row=mysql_fetch_array($viewsql))
	{
		echo "<tr>";
		echo "<td>".$row['name']."</td>";
		echo "<td>".$row['quantity']."</td>";
		echo "<td>".$row['contact_id']."</td>";
		echo "</tr>";
		
	}*/
	?>
</table>
</div></div></div>
<?php echo $this->basePath();?>/public/fonts/
<?php echo $this->basePath();?>/default/css/style.css
 
 -->
</body>